package com.example.netty.tcp.message;

import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonSubTypes;
import com.fasterxml.jackson.annotation.JsonTypeInfo;


@JsonIgnoreProperties(ignoreUnknown = true)
public abstract class BaseMessage {
    @JsonProperty("msgType")
    private int msgType;

    @JsonProperty("devId")
    private String devId;

    @JsonProperty("txnNo")
    private long txnNo;

    @JsonProperty("param")
    private String param; // 控制参数（如MOS开关指令）

    public String getParam() {
        return param;
    }

    public void setParam(String param) {
        this.param = param;
    }

    public int getMsgType() {
        return msgType;
    }

    public void setMsgType(int msgType) {
        this.msgType = msgType;
    }

    public String getDevId() {
        return devId;
    }

    public void setDevId(String devId) {
        this.devId = devId;
    }

    public long getTxnNo() {
        return txnNo;
    }

    public void setTxnNo(long txnNo) {
        this.txnNo = txnNo;
    }
}
